package com.smu.recognize.controller;

import com.smu.recognize.model.common.JsonReturn;
import com.smu.recognize.mqtt.MqttPushClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
* Web消息推送
* */
@RestController
@Slf4j
public class AnnouncementController {
    @RequestMapping("/web/publish")
    public JsonReturn publishInfo(String title,String content){
        MqttPushClient client=MqttPushClient.getInstance();
        client.webPublish(title,content);
        return new JsonReturn(true);
    }
}
